package hbbft

import (
	"crypto/sha256"
)

type Transaction interface {
	Hash() []byte
}

// SimpleTransaction 简单的交易实现，用于测试
type SimpleTransaction string

func (t SimpleTransaction) Hash() []byte {
	hash := sha256.Sum256([]byte(t))
	return hash[:]
}

func (t SimpleTransaction) String() string {
	return string(t)
}
